package com.danco.planner.controllers.core;

import com.danco.planner.controllers.core.singleton.ConsoleWindowDirector;
import com.danco.planner.supportclasses.enumeration.IEventType;
import com.danco.planner.view.core.View;

public class ViewController {

	protected View baseView;
	public View getBaseView() {
		return baseView;
	}
		
	public ViewController() {
		this(new View());
	}
	public ViewController(View view) {
		super();
		this.baseView = view;
	}

	protected void pushViewController(ViewController vc) {
		ConsoleWindowDirector.getSharedWindow().pushViewController(vc);
	}
	public void popViewController() {
		ConsoleWindowDirector.getSharedWindow().popViewController(this);
	}
	
	public void show() {
		baseView.show();
	}
	public void doActionWithType(IEventType type, String command) {
		this.baseView.doActionWithType(type, command);
	}

}
